package com.xuqm.sdhbwfu.app.model


import com.google.gson.annotations.SerializedName

data class RiskSchemaModel(
    @SerializedName("attrs")
    val attrs: List<Attr>,
    @SerializedName("code")
    val code: String,
    @SerializedName("created")
    val created: String,
    @SerializedName("desc")
    val desc: Any,
    @SerializedName("_id")
    val id: String,
    @SerializedName("name")
    val name: String,
    @SerializedName("relations")
    val relations: List<Any>,
    @SerializedName("schemadef")
    val schemadef: Schemadef,
    @SerializedName("updated")
    val updated: String,
    @SerializedName("__v")
    val v: Int
) {
    data class Attr(
        @SerializedName("key")
        val key: String,
        @SerializedName("value")
        val value: String
    )

    data class Schemadef(
        @SerializedName("attrs")
        val attrs: List<Attr>,
        @SerializedName("category")
        val category: String,
        @SerializedName("code")
        val code: String,
        @SerializedName("created")
        val created: String,
        @SerializedName("desc")
        val desc: String,
        @SerializedName("_id")
        val id: String,
        @SerializedName("lock")
        val lock: Boolean,
        @SerializedName("name")
        val name: String,
        @SerializedName("relations")
        val relations: List<Any>,
        @SerializedName("updated")
        val updated: String,
        @SerializedName("__v")
        val v: Int
    ) {
        data class Attr(
            @SerializedName("dtype")
            val dtype: String,
            @SerializedName("dvalue")
            val dvalue: String,
            @SerializedName("enums")
            val enums: List<Enum>,
            @SerializedName("field")
            val `field`: String,
            @SerializedName("len")
            val len: Int,
            @SerializedName("name")
            val name: String,
            @SerializedName("notnullable")
            val notnullable: Boolean
        ) {
            data class Enum(
                @SerializedName("id")
                val id: String,
                @SerializedName("label")
                val label: String,
                @SerializedName("value")
                val value: String
            )
        }
    }
}